<ui:composition template="/resources/templates/table.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets">
    <f:metadata>
        <f:viewParam name="tab" value="#{currentView.tab}"/>
        <f:viewParam name="page" value="#{currentView.page}" />
        <f:viewAction action="#{systemPropsTable.renderTable}" phase="UPDATE_MODEL_VALUES"/>
    </f:metadata>
    <ui:define name="table-header">
        <!--<f:event listener="#{systemPropsTable.renderTable}" type="preRenderView"/>-->
        <h:outputText value="#{msgs['table.systemProps']}" styleClass="table_name"/>
    </ui:define>

    <!--<ui:define name="button-menu-top">-->
    <!--</ui:define>-->

    <ui:define name="table-content">
        <h:form>
            <div>
                <h:button value="#{msgs['edit']}" outcome="/modules/setting/systemPropsEdit" styleClass="margin2ptb">
                    <f:param name="tab" value="#{currentView.tab}"/>
                    <f:param name="page" value="#{currentView.page}"/>
                </h:button>
                <!--<h:commandButton value="#{msgs['edit']}" immediate="true"-->
                <!--styleClass="margin2ptb">-->
                <!--<f:ajax event="click" immediate="true" listener="#{systemPropsController.selectAction}"/>-->
                <!--<f:param name="tab" value="systemProps"/>-->
                <!--<f:param name="page" value="#{systemPropsTable.currentPage}"/>-->
                <!--</h:commandButton>-->
                <!--<h:commandButton value="#{msgs['edit']}9" action="#{systemPropsController.edit}"-->
                <!--styleClass="margin2ptb"/>-->
            </div>
            <!--<div>-->
            <!--<h:commandButton action="#{modulesController.getModuleById}" title="#{msgs['edit']}"-->
            <!--value="#{msgs['edit']}" styleClass="margin2ptb"/>-->
            <!--</div>-->
            <div class="table_wrapper">
                <div>
                    <div>
                        <div style="width: 100%;">
                            <table border="0" cellspacing="0" cellpadding="0" class="table_data">
                                <thead>
                                <tr>
                                    <th class="th_data_first"></th>
                                    <th class="th_data">#{msgs['code']}</th>
                                    <th class="th_data">#{msgs['value']}</th>
                                    <th class="th_data">#{msgs['description']}</th>
                                </tr>
                                </thead>
                                <ui:repeat value="#{systemPropsTable.pagebleRecords}" var="systemProp"
                                           varStatus="systemPropindex">
                                    <tr class="#{systemPropindex.even ? 'even' : 'odd'}">
                                        <td class="td_data_first">
                                            <!--<h:selectOneRadio immediate="true" name="systemPropBeanId" value="#{systemProp.id}">-->
                                            <!--<f:ajax event="click" listener="#{systemPropsController.selectAction}"/>-->
                                            <!--</h:selectOneRadio>-->
                                            <input type="radio" value="#{systemProp.id}" name="beanId"/>
                                        </td>
                                        <td class="td_data">#{systemProp.code}</td>
                                        <td class="td_data">#{systemProp.value}</td>
                                        <td class="td_data">#{systemProp.description}</td>
                                    </tr>
                                </ui:repeat>
                            </table>
                        </div>
                    </div>
                </div>
                <ui:include src="/resources/includes/pagination.xhtml">
                    <ui:param name="paginationBean" value="#{systemPropsTable}"/>
                </ui:include>
            </div>
            <div>
                <!--<h:commandButton value="#{msgs['edit']}" action="#{systemPropsController}"-->
                <!--styleClass="margin2ptb">-->
                <!--<f:param name="tab" value="systemProps"/>-->
                <!--<f:param name="page" value="#{systemPropsTable.currentPage}"/>-->
                <!--</h:commandButton>-->
            </div>
            <!--<div>-->
            <!--<h:commandButton action="#{modulesController.getModuleById}" title="#{msgs['edit']}"-->
            <!--value="#{msgs['edit']}" styleClass="margin2ptb"/>-->
            <!--</div>-->
        </h:form>
    </ui:define>

    <!--<ui:define name="button-menu-bottom">-->
    <!--</ui:define>-->

</ui:composition>